home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-01-15 | 80.4 KB | 2,638 lines |
- diff -u -r --new-file last-version/docs/DOMAIN.txt samba-1.9.15p7/docs/DOMAIN.txt
- --- last-version/docs/DOMAIN.txt Thu Jan 1 10:00:00 1970
- +++ samba-1.9.15p7/docs/DOMAIN.txt Mon Jan 15 19:58:59 1996
- @@ -0,0 +1,59 @@
- +Samba now supports domain logons and network logon scripts. The
- +support is still experimental, but it seems to work.
- +
- +The support is also not complete. Samba does not yet support the
- +sharing of the SAM database with other systems yet, or remote
- +administration. Support for these kind of things should be added
- +sometime in the future.
- +
- +Using these features you can make your clients verify their logon via
- +the Samba server and make clients run a batch file when they logon to
- +the network. The latter is particularly useful.
- +
- +To use domain logons you need to do the following:
- +
- +1) Setup nmbd and smbd and configure the smb.conf so that Samba is
- +acting as the master browser. See INSTALL.txt and BROWSING.txt for
- +details.
- +
- +2) create a share called [netlogon] in your smb.conf. This share should
- +be readable by all users, and probably should not be writeable. This
- +share will hold your network logon scripts.
- +
- +For example I have used:
- +
- + [netlogon]
- + path = /data/dos/netlogon
- + writeable = no
- + guest ok = yes
- +
- +
- +3) in the [global] section of smb.conf set the following:
- +
- + domain logons = yes
- + logon script = %U.bat
- +
- +the choice of batch file is, of course, up to you. The above would
- +give each user a separate batch file as the %U will be changed to
- +their username automatically. The other standard % macros may also be
- +used. You can make the btch files come from a subdirectory by using
- +soemthing like:
- +
- + logon script = scripts\%U.bat
- +
- +4) create the batch files to be run when the user logs in. If the batch
- +file doesn't exist then no batch file will be run.
- +
- +In the batch files you need to be careful to use DOS style cr/lf line
- +endings. If you don't then DOS may get confused. I suggest you use a
- +DOS editor to remotely edit the files if you don't know how to produce
- +DOS style files under unix.
- +
- +5) Use smbclient with the -U option for some users to make sure that
- +the \\server\NETLOGON share is available, the batch files are visible
- +and they are readable by the users.
- +
- +6) you will probabaly find that your clients automatically mount the
- +\\SERVER\NETLOGON share as drive z: while logging in. You can put some
- +useful programs there to execute from the batch files.
- +
- diff -u -r --new-file last-version/docs/README.jis samba-1.9.15p7/docs/README.jis
- --- last-version/docs/README.jis Fri Nov 24 14:55:12 1995
- +++ samba-1.9.15p7/docs/README.jis Mon Nov 27 10:55:51 1995
- @@ -34,12 +34,6 @@
- $B$N(B16$B?J?t$rB3$1$k7A<0$K$J$j$^$9!#(B
- $B$3$3$G!"(B':' $B$rB>$NJ8;z$KJQ99$7$?$$>l9g$O!"(Bhex $B$N8e$m$K$=$NJ8;z$r;XDj$7$^$9!#(B
- $BNc$($P!"(B@$B$rJQ$o$j$K;H$$$?$$>l9g$O!"(B'hex@'$B$N$h$&$K;XDj$7$^$9!#(B
- - cap: 7 bits $B$N(B ASCII $B%3!<%I0J30$N%3!<%I$r0J2<$N7A<0$GI=$9J}<0$H$$$&E@$G$O(B
- - hex$B$HF1MM$G$9$,!"(BCAP (The Columbia AppleTalk Package)$B$H8_49@-$r;}$DJQ49(B
- - $BJ}<0$H$J$C$F$$$^$9!#(Bhex$B$H$N0c$$$O(B0x80$B0J>e$N%3!<%I$N$_(B':80'$B$N$h$&$KJQ49(B
- - $B$5$l!"$=$NB>$O(BASCII$B%3!<%I$G8=$5$l$^$9!#(B
- - $BNc$($P!"(B'$B%*%U%#%9(B'$B$H$$$&L>A0$O!"(B':83I:83t:83B:83X'$B$H$J$j$^$9!#(B
- -
- JIS $B%3!<%I$K$D$$$F$O!"0J2<$NI=$r;2>H$7$F2<$5$$!#(B
- $B(#(!(!(!(((!(!(!(!(((!(!(!(!(((!(!(!(!(((!(!(!(!(((!(!(!(!(((!(!(!(!(!(!(!(!(!($(B
- $B(";XDj(B $B("4A;z3+;O("4A;z=*N;("%+%J3+;O("%+%J=*N;("1Q?t3+;O("Hw9M(B $B("(B
- @@ -118,13 +112,13 @@
-
- 5. $B$=$NB>(B
-
- - $B%3!<%IJQ49$O0J2<$NJ}!9$,:n$i$l$?%W%m%0%i%`$rMxMQ$7$F$$$^$9!#(B
- + hex $B7A<0$NJQ49J}K!$O!"(B
- +
- + $BBgLZ!wBgDM!&C^GH(B <ohki@gssm.otsuka.tsukuba.ac.jp>$B;a(B
-
- - hex $B7A<0(B $BBgLZ!wBgDM!&C^GH(B <ohki@gssm.otsuka.tsukuba.ac.jp>$B;a(B
- - cap $B7A<0(B $BI%ED(B $BF;O:(B (michiro@po.iijnet.or.jp)(michiro@dms.toppan.co.jp)$B;a(B
- + $B$,:n$i$l$?%3!<%I$rMxMQ$7$F$$$^$9!#(B
-
- 1994$BG/(B10$B7n(B28$BF|(B $BBh#1HG(B
- 1995$BG/(B 8$B7n(B16$BF|(B $BBh#2HG(B
- -1995$BG/(B11$B7n(B24$BF|(B $BBh#3HG(B
- $BF#ED(B $B?r(B fujita@ainix.isac.co.jp
-
- diff -u -r --new-file last-version/docs/SCO.txt samba-1.9.15p7/docs/SCO.txt
- --- last-version/docs/SCO.txt Fri Dec 1 09:59:21 1995
- +++ samba-1.9.15p7/docs/SCO.txt Mon Nov 27 10:55:51 1995
- @@ -1,4 +1,4 @@
- -There is an annoying TCPIP bug in SCO Unix. This causes corruption when
- +There is an annoying TCPIP bug in SCO Unix. This causes orruption when
- transferring files with Samba.
-
- Geza Makay (makayg@math.u-szeged.hu) sends this information:
- @@ -9,8 +9,4 @@
- You do not need anything else but the above patch. It installs in seconds,
- and corrected the Excel problem. We also had some other minor problems (not
- only with Samba) that disappeared by installing this patch.
- -
- -I've also heard that you need net382e (whatever that is!). This was
- -reported by Eigil Krogh Sorensen <eks@aar-vki.dk>.
- -
-
- diff -u -r --new-file last-version/docs/Speed.txt samba-1.9.15p7/docs/Speed.txt
- --- last-version/docs/Speed.txt Sun Dec 3 21:46:18 1995
- +++ samba-1.9.15p7/docs/Speed.txt Mon Nov 27 10:55:51 1995
- @@ -113,19 +113,6 @@
- read-write. For many applications that do their own locking this
- doesn't matter, but for some it may.
-
- -
- -MEMORY USAGE
- -------------
- -
- -The biggest user of memory is the MAXDIR option in local.h. This
- -determines how many open directories are cached in memory. If the
- -client access lots of large directories and doesn't explicitly close
- -then when finished then a large MAXDIR can use a lot of server memory.
- -
- -The default is 64. In most situations it is safe to reduce it to 16 or
- -even less. It must be at least 2 to operate correctly.
- -
- -
- LOG LEVEL
- ---------
-
- diff -u -r --new-file last-version/docs/Support.txt samba-1.9.15p7/docs/Support.txt
- --- last-version/docs/Support.txt Wed Nov 22 22:25:08 1995
- +++ samba-1.9.15p7/docs/Support.txt Mon Jan 15 12:45:44 1996
- @@ -1,19 +1,22 @@
- The Samba Consultants List
- ==========================
-
- -I often get asked about paid support for Samba. I don't have the
- -time/inclination to do this myself at the moment, so I decided to
- -compile a list of people who are prepared to install/support Samba.
- +This is a list of people who are prepared to install and support Samba.
- +Note that in most countries nobody should admit to "supplying" Samba, since
- +there is then an implied warranty with possibly onerous legal obligations.
- +Just downloading and installing it isn't supply in this sense, but advertising
- +"run our Samba for best results" may be so.
-
- -Being on this list does not imply any sort of endorsement, I just
- -provide this list in the hope that it will be useful.
- +Being on this list does not imply any sort of endorsement by anyone, it is just
- +provided in the hope that it will be useful.
-
- If you want to be added to the list, or want your entry modified then
- -contact me at the address below. I am currently listing them in the
- -order that I have received them. If it gets too big I may organise it
- -by region.
- +contact the address below. They are currently listed in the
- +order that they were received. If it gets too big we may organise it
- +by region. Please make sure to include a header line giving the region
- +and country, eg CANBERRA - AUSTRALIA.
-
- -You can contact the maintainer at samba-bugs@anu.edu.au
- +You can contact the maintainers at samba-bugs@anu.edu.au
-
-
- ------------------------------------------------------------------------------
- @@ -46,6 +49,8 @@
- ------------------------------------------------------------------------------
-
- ------------------------------------------------------------------------------
- +ILLONOIS - USA
- +
- Information One, Inc.
- 736 Hinman Ave, Suite 2W
- Evanston, IL 60202
- @@ -210,4 +215,118 @@
- >> Software forensics <<
- > Data translation <
- ------------------------------------------------------------------------------
- +
- +----------------------------------------------------------
- +Adelaide, Australia
- +
- +NS Computer Software and Services P/L
- +PO Box 86
- +Ingle Farm
- +SA 5098
- +
- +Contact: Richard Sharpe
- + Ph: +61-8-281-0063 (08-281-0063) AH
- + FAX:+61-8-250-2080 (08-250-2080)
- +
- +Experience with: ULTRIX, Digital UNIX, SunOS, WfW 3.11, Win95, WNT 3.51
- +
- +----------------------------------------------------------
- +
- +----------------------------------------------------------
- +TECTONIC LIMITED
- +WESTWOOD
- +78 LOUGHBOROUGH ROAD
- +QUORN
- +LEICESTERSHIRE
- +LE12 8DX
- +
- +TELEPHONE 01509-620922
- +FAX 01509-620933
- +
- +CONTACT DAVID ROBINSON
- +
- +WE ARE UNIX ORIENTATED BUT ALSO SPECIALISE IN PC TO UNIX COMMUNICATIONS, WE
- +KNOW AND UNDERSTAND PC-NFS, (HENCE OUR INTEREST IN SAMBA).
- +WE SUPPORT SUNOS, SOLARIS 1.X AND 2.X, HP-UX 9.0 AND 10.0, OSF (or DEC UNIX,
- +whichever you prefer), WinNT, WfWG and Win95.
- +
- +WE ARE ALREADY TALKING TO A COUPLE OF VERY LARGE SAMBA USERS HERE IN THE UK.
- +WE WOULD LIKE TO SUPPORT THEM (AND MANY MORE), WOULD YOU PLEASE CONTACT ME ON:
- +david@tectonic.demon.co.uk
- +----------------------------------------------------------
- +
- +----------------------------------------------------------
- +MIAMI, FL - USA
- +
- +Swaney & Associates, Inc.
- +ATTN: Stephen Swaney
- + 2543 Lincoln Avenue
- + Miami, Florida 33133
- + U.S.A
- + (305) 860-0570
- +
- +Specializing in:
- + High Availability system & networks
- + UNIX to PC connectivity
- + Market Data systems
- + Messaging Systems (Sendmail & Microsoft Exchange)
- +----------------------------------------------------------
- +
- +------------------------------------------------------------------------------
- +NEW JERSEY - USA
- +
- +William J. Maggio
- +LAN & Computer Integrators, Inc.
- +242 Old New Brunswick Road Email: bmaggio@lci.com
- +Suite 440 Voice: 908-981-1991
- +Piscataway, NJ 08855 Fax : 908-981-1858
- +
- + Specializing in Internet connectivity and security, Sun integration and
- + high speed, enterprise network design and deployment.
- +------------------------------------------------------------------------------
- +
- +FAREHAM - ENGLAND
- +
- +High Field Technology Ltd
- +Little Park Farm Road, Segensworth West,
- +Fareham, Hants PO15 5SJ, UK.
- +sales@hft.co.uk tel +44 148 957 0111 fax +44 148 957 0555
- +
- +Company skills: Real time hardware and software systems
- +
- +Samba experience: BSD/OS, Linux, LynxOS <==> WFWG, NT
- +
- +------------------------------------------------------------------------------
- +
- +-----------------------------------------------------------------------
- +QUEBEC - CANADA
- +
- +Dataden Computer Systems
- +Attn: Danny Arseneau
- +arseneau@parkmed.com
- +895 2nd Avenue
- +Ile Bizard, Quebec
- +Canada, H9C 1K3
- +Tel: (514)891-2293
- +Fax: (514)696-0848
- +
- +Dataden is company that specializes in Unix--TCP/IP networking.
- +We have over 15 years of experience. We have been installing,
- +configuring and maintaining Samba for clients for 1-1/2 years now. We
- +have samba installations on Linx, SunOS and DEC OSF. Our biggest site
- +has 4 Suns and 3 Linux servers running Samba which are serving a network
- +of about 50 PC's running WFWg and Win95.
- +-----------------------------------------------------------------------
- +
- +-----------------------------------------------------------------------
- +CALIFORNIA - USA
- +
- +Ron Halstead
- +Open Systems Consulting
- +3098-4 Lakemont Drive
- +San Ramon, CA 94583 (San Francisco Bay Area)
- +(510) 735-7529
- +halstead@ix.netcom.com
- +-----------------------------------------------------------------------
- +
-
- diff -u -r --new-file last-version/docs/addtosmbpass.1 samba-1.9.15p7/docs/addtosmbpass.1
- --- last-version/docs/addtosmbpass.1 Fri Nov 24 00:38:09 1995
- +++ samba-1.9.15p7/docs/addtosmbpass.1 Thu Jan 1 10:00:00 1970
- @@ -1,59 +0,0 @@
- -.TH addtosmbpass 1 "16 November 1995"
- -.SH NAME
- -addtosmbpass \- add entry for an existing account to a Samba password
- -file.
- -.SH SYNOPSIS
- -.B addtosmbpass
- -.I name
- -[
- -.I "name \&..."
- -]
- -.SH DESCRIPTION
- -.I addtosmbpass
- -is a utility for adding entries, in a proper format,
- -to a file used by Samba when validating passwords for clients (most
- -likely
- -.I "/usr/local/samba/lib/smbpasswd"
- -but this default can be changed in a compile time). An old (possibly
- -empty as in
- -.I /dev/null
- -) Samba password file is expected on stdin and a new file, with
- -skeleton entries for arguments added, is printed on stdout. A file
- -.I "/etc/passwd"
- -is scanned for a required information.
- -If an entry for a
- -.I name
- -is not present then account data are searched in NIS data bases -
- -if possible. If an entry for
- -.I name
- -already exists in stdin input or it account information cannot be
- -found then this request is quietly skipped.
- -.SH FILES
- -.I "/usr/local/samba/lib/smbpasswd, /etc/passwd"
- -.SH "SEE ALSO"
- -smbpasswd(1), passwd(5), ypmatch(1)
- -.SH BUGS
- -.I addtosmbpass,
- -like other Samba password file utilities, is written
- -in
- -.I awk.
- -Although an attempt was made to accommodate various broken
- -variants of
- -.I awk
- -which may be around there is no guarantee that what you have
- -is even worse.
- -.PP
- -It is assumed that if
- -.I ypmatch
- -program exists then NIS was set and the program will work. This
- -may not be true. In such case just comment out a line which sets
- -.B ypmatch
- -variable
- -in BEGIN block.
- -.PP
- -A location of awk interpreter at the top of the program may need
- -an adjustment. Also a user may edit a program modifying it beyong
- -recognition. This last property may be construed as a feature.
- -.SH AUTHOR
- -Michal Jaegermann (michal@ellpspace.math.ualberta.ca)
- -
- diff -u -r --new-file last-version/docs/nmbd.8 samba-1.9.15p7/docs/nmbd.8
- --- last-version/docs/nmbd.8 Sun Dec 3 18:50:56 1995
- +++ samba-1.9.15p7/docs/nmbd.8 Mon Nov 27 10:55:52 1995
- @@ -264,7 +264,7 @@
-
- The log files generated are never removed by the server.
- .RE
- -.\" .RE
- +.RE
-
- .B -n
- .I netbios name
- @@ -324,7 +324,7 @@
- mapping of service name (eg., netbios-ns) to service port (eg., 137) and
- protocol type (eg., udp). See the section "INSTALLATION" below.
- .RE
- -.\" .RE
- +.RE
-
- .SH ENVIRONMENT VARIABLES
- Not applicable.
- @@ -479,8 +479,7 @@
- This man page written by Karl Auer (Karl.Auer@anu.edu.au)
-
- See
- -.B smb.conf(5)
- -for a full list of contributors and details on how to
- +.B smb.conf(5) for a full list of contributors and details on how to
- submit bug reports, comments etc.
-
-
- diff -u -r --new-file last-version/docs/security_level.txt samba-1.9.15p7/docs/security_level.txt
- --- last-version/docs/security_level.txt Tue Dec 5 14:52:56 1995
- +++ samba-1.9.15p7/docs/security_level.txt Thu Jan 1 10:00:00 1970
- @@ -1,78 +0,0 @@
- -Description of SMB security levels.
- -----------------------------------
- -
- -
- -A SMB server tells the client at startup what "security level" it is
- -running. There are two options "share level" and "user level". Which
- -of these two the client receives affects the way the client then tries
- -to authenticate itself. It does not directly affect (to any great
- -extent) the way the Samba server does security. I know this is
- -strange, but it fits in with the client/server aproach of SMB. In SMB
- -everything is initiated and controlled by the client, and the server
- -can only tell the client what is available and whether an action is
- -allowed.
- -
- -I'll describe user level security first, as its simpler. In user level
- -security the client will send a "session setup" command directly after
- -the protocol negotiation. This contains a username and password. The
- -server can either accept or reject that username/password
- -combination. Note that at this stage the server has no idea what
- -share the client will eventually try to connect to, so it can't base
- -the "accept/reject" on anything other than:
- -
- -- the username/password
- -- the machine that the client is coming from
- -
- -If the server accepts the username/password then the client expects to
- -be able to mount any share (using a "tree connection") without
- -specifying a password. It expects that all access rights will be as
- -the username/password specified in the "session setup".
- -
- -It is also possible for a client to send multiple "sesion setup"
- -requests. When the server responds it gives the client a "uid" to use
- -as an authentication tag for that username/password. The client can
- -maintain multiple authentication contexts in this way (WinDD is an
- -example of an application that does this)
- -
- -
- -Ok, now for share level security. In share level security (the default
- -with samba) the client authenticates itself separately for each
- -share. It will send a password along with each "tree connection"
- -(share mount). It does not explicitly send a username with this
- -operation. The client is expecting a password to be assciated with
- -each share, independent of the user. This means that samba has to work
- -out what username the client probably wants to use. It is never
- -explicitly sent the username. A "real" SMB server like NT actually
- -associates passwords directly with shares in share level security, but
- -samba always uses the unix authentication scheme where it is a
- -username/password that is authenticated, not a "share/password".
- -
- -Many clients send a "session setup" even if the server is in share
- -level security. They normally send a valid username but no
- -password. Samba records this username is a list of "possible
- -usernames". When the client then does a "tree connection" it also adds
- -to this list the name of the share they try to connect to (useful for
- -home directories) and any users listed in the "user =" smb.conf
- -line. The password is then checked in turn against these "possible
- -usernames". If a match is found then the client is authenticated as
- -that user.
- -
- -Finally "server level" security. In server level security the samba
- -server reports to the client that it is in user level security. The
- -client then does a "session setup" as described earlier. The samba
- -server takes the username/password that the client sends and attempts
- -to login to the "password server" by sending exactly the same
- -username/password that it got from the client. If that server is in
- -user level security and accepts the password then samba accepts the
- -clients connection. This allows the samba server to use another SMB
- -server as the "password server".
- -
- -You should also note that at the very start of all this, where the
- -server tells the client what security level it is in, it also tells
- -the client if it supports encryption. If it does then it supplies the
- -client with a random "cryptkey". The client will then send all
- -passwords in encrypted form. You have to compile samba with encryption
- -enabled to support this feature, and you have to maintain a separate
- -smbpasswd file with SMB style encrypted passwords. It is
- -cryptographically impossible to translate from unix style encryption
- -to SMB style encryption.
- diff -u -r --new-file last-version/docs/smb.conf.5 samba-1.9.15p7/docs/smb.conf.5
- --- last-version/docs/smb.conf.5 Sun Dec 3 19:12:21 1995
- +++ samba-1.9.15p7/docs/smb.conf.5 Mon Jan 15 20:31:25 1996
- @@ -320,10 +320,6 @@
-
- auto services
-
- -browse list
- -
- -character set
- -
- config file
-
- deadtime
- @@ -418,10 +414,6 @@
-
- strip dot
-
- -syslog
- -
- -syslog only
- -
- time offset
-
- username map
- @@ -513,8 +505,6 @@
-
- max connections
-
- -max disk size
- -
- min print space
-
- only guest
- @@ -702,30 +692,9 @@
- .B Example:
- browseable = No
-
- -.SS browse list (G)
- -
- -This boolean determines if the server will allow the client to query
- -the local browse list, which holds the list of available servers in
- -the workgroup.
- -
- -It defaults to yes.
- -
- .SS case sig names (G)
- See "case sensitive"
-
- -.SS character set (G)
- -
- -This option allows you to select an alternate character set for the
- -server, to allow for correct translation of "foreign" characters.
- -
- -Currently the only supported alternate character set is "iso8859-1"
- -which is probably good for sweden and maybe other nordic countries.
- -
- -The default is to use the PCs characters untranslated.
- -
- -.B Example:
- - character set = iso8859-1
- -
- .SS comment (S)
- This is a text field that is seen when a client does a net view to
- list what shares are available. It will also be used when browsing is
- @@ -1355,20 +1324,6 @@
- .B Example:
- mangling char = ^
-
- -.SS max disk size (G)
- -
- -This option helps with large disks and applications that can't handle
- -them. You use it to pretend to the client that the disk is smaller,
- -but the client will still be able to use all available disk space.
- -
- -You specify the size in MB. A size of less than 1024 will fix problems
- -with fussy programs.
- -
- -By default the "max disk size" is 0, which means no maximum.
- -
- -.B Example:
- - max disk size = 1024
- -
- .SS max log file (G)
-
- This option (an integer in kilobytes) specifies the max size the log
- @@ -1638,8 +1593,7 @@
- .B password level
- is set to 1 (one), the following combinations would be tried if "FRED" failed:
- "Fred", "fred", "fRed", "frEd", "freD". If
- -.B password level
- -was set to 2 (two), the following combinations would also be
- +.B password level was set to 2 (two), the following combinations would also be
- tried: "FRed", "FrEd", "FreD", "fREd", "fReD", "frED". And so on.
-
- The higher value this parameter is set to the more likely it is that a mixed
- @@ -1693,6 +1647,10 @@
- you better trust your clients, and you better restrict them with hosts
- allow!
-
- +If you list several hosts in the "password server" option then smbd
- +will try each in turn till it finds one that responds. This is useful
- +in case your primary server goes down.
- +
- .SS path (S)
- A synonym for this parameter is 'directory'.
-
- @@ -2323,43 +2281,6 @@
-
- .B Example:
- sync always = yes
- -
- -.SS syslog (G)
- -
- -This integer parameter is used in conjunction with
- -.B debug level
- -to filter out debugging messages destined for the system logger.
- -Only those debugging messages that are
- -.I less than or equal to
- -.B debug level
- -and
- -.I less than
- -.B syslog
- -are sent to the system logger. Thus, a value of 0 can be used
- -to turn off system logging.
- -
- -You must compile with -DSYSLOG in order for system logging to
- -be enabled.
- -
- -.B Default:
- - syslog = 1
- -
- -.B Example:
- - syslog = 0
- -
- -.SS syslog only (G)
- -
- -This boolean controls whether debugging messages are sent to the
- -log file and system logger, or only to the system logger.
- -
- -You must compile with -DSYSLOG in order for system logging to
- -be enabled.
- -
- -.B Default:
- - syslog only = False
- -
- -.B Example:
- - syslog only = True
-
- .SS time offset (G)
- This parameter is a setting in minutes to add to the normal GMT to
- diff -u -r --new-file last-version/docs/smbclient.1 samba-1.9.15p7/docs/smbclient.1
- --- last-version/docs/smbclient.1 Sun Dec 3 18:50:56 1995
- +++ samba-1.9.15p7/docs/smbclient.1 Mon Nov 27 10:55:54 1995
- @@ -50,8 +50,7 @@
- an interface similar to that of the
- .B ftp
- program (see
- -.B ftp(1)).
- -Operations include things like getting files from the
- +.B ftp(1)). Operations include things like getting files from the
- server to the local machine, putting files from the local machine to
- the server, retrieving directory information from the server and so on.
-
- @@ -317,7 +316,7 @@
-
- The log files generated are never removed by the client.
- .RE
- -.\" .RE
- +.RE
-
- .B -n
- .I netbios name
- @@ -851,7 +850,7 @@
- files that match the mask specified using the
- .B mask
- command will be retrieved. See also the
- -.B mask
- +.mask
- command.
-
- When recursion is toggled OFF, only files from the current working
- @@ -937,8 +936,7 @@
-
- To test the client, you will need to know the name of a running Lan manager
- server. It is possible to run the smbd (see
- -.B smbd(8))
- -as an ordinary user - running that server as a daemon on a
- +.B smbd(8)) as an ordinary user - running that server as a daemon on a
- user-accessible port (typically any port number over 1024) would
- provide a suitable test server.
- .SH VERSION
- @@ -978,6 +976,5 @@
- This man page written by Karl Auer (Karl.Auer@anu.edu.au)
-
- See
- -.B smb.conf(5)
- -for a full list of contributors and details on how to
- +.B smb.conf(5) for a full list of contributors and details on how to
- submit bug reports, comments etc.
- diff -u -r --new-file last-version/docs/smbd.8 samba-1.9.15p7/docs/smbd.8
- --- last-version/docs/smbd.8 Sun Dec 3 18:50:56 1995
- +++ samba-1.9.15p7/docs/smbd.8 Mon Nov 27 10:55:54 1995
- @@ -35,14 +35,12 @@
- An extensive description of the services that the server can provide is given
- in the man page for the configuration file controlling the attributes of those
- services (see
- -.B smb.conf(5)).
- -This man page will not describe the services, but
- +.B smb.conf(5)). This man page will not describe the services, but
- will concentrate on the administrative aspects of running the server.
-
- Please note that there are significant security implications to running this
- server, and
- -.B smb.conf(5)
- -should be regarded as mandatory reading before proceeding with
- +.B smb.conf(5) should be regarded as mandatory reading before proceeding with
- installation.
-
- A session is created whenever a client requests one. Each client gets a copy
- @@ -188,7 +186,7 @@
- clients. See
- .B smb.conf(5) for more information.
- .RE
- -.\" .RE
- +.RE
-
- .SH LIMITATIONS
-
- @@ -405,6 +403,5 @@
- This man page written by Karl Auer (Karl.Auer@anu.edu.au)
-
- See
- -.B smb.conf(5)
- -for a full list of contributors and details on how to
- +.B smb.conf(5) for a full list of contributors and details on how to
- submit bug reports, comments etc.
- diff -u -r --new-file last-version/docs/smbrun.1 samba-1.9.15p7/docs/smbrun.1
- --- last-version/docs/smbrun.1 Sun Dec 3 18:50:56 1995
- +++ samba-1.9.15p7/docs/smbrun.1 Mon Nov 27 10:55:54 1995
- @@ -66,6 +66,5 @@
- This man page was written by Karl Auer (Karl.Auer@anu.edu.au)
-
- See
- -.B smb.conf(5)
- -for a full list of contributors and details of how to
- +.B smb.conf(5) for a full list of contributors and details of how to
- submit bug reports, comments etc.
- diff -u -r --new-file last-version/docs/smbstatus.1 samba-1.9.15p7/docs/smbstatus.1
- --- last-version/docs/smbstatus.1 Sun Dec 3 18:50:56 1995
- +++ samba-1.9.15p7/docs/smbstatus.1 Mon Nov 27 10:55:54 1995
- @@ -48,6 +48,5 @@
- .B smbd(8)
-
- See
- -.B smb.conf(5)
- -for a full list of contributors and details on how to
- +.B smb.conf(5) for a full list of contributors and details on how to
- submit bug reports, comments etc.
- diff -u -r --new-file last-version/docs/testparm.1 samba-1.9.15p7/docs/testparm.1
- --- last-version/docs/testparm.1 Sun Dec 3 18:50:56 1995
- +++ samba-1.9.15p7/docs/testparm.1 Mon Nov 27 10:55:54 1995
- @@ -100,6 +100,5 @@
- (Karl.Auer@anu.edu.au)
-
- See
- -.B samba(7)
- -for a full list of contributors and details on how to
- +.B samba(7) for a full list of contributors and details on how to
- submit bug reports, comments etc.
- diff -u -r --new-file last-version/docs/testprns.1 samba-1.9.15p7/docs/testprns.1
- --- last-version/docs/testprns.1 Sun Dec 3 18:50:56 1995
- +++ samba-1.9.15p7/docs/testprns.1 Mon Nov 27 10:55:54 1995
- @@ -103,6 +103,5 @@
- (Karl.Auer@anu.edu.au)
-
- See
- -.B samba(7)
- -for a full list of contributors and details of how to
- +.B samba(7) for a full list of contributors and details of how to
- submit bug reports, comments etc.
- diff -u -r --new-file last-version/source/Makefile samba-1.9.15p7/source/Makefile
- --- last-version/source/Makefile Mon Dec 4 10:50:41 1995
- +++ samba-1.9.15p7/source/Makefile Mon Jan 15 19:02:02 1996
- @@ -34,6 +34,9 @@
- # This may help with some versions of make
- SHELL = /bin/sh
-
- +# The following can be useful for compiling on multiple architectures
- +srcdir=.
- +VPATH=$(srcdir)
-
- # set these to where to find various files
- # These can be overridden by command line switches (see smbd(8))
- @@ -91,7 +94,7 @@
- # DES_BASE=/usr/local/libdes
- # DES_FLAGS= -I$(DES_BASE)
- # DES_LIB= -L$(DES_BASE) -ldes
- -# PASSWD_FLAGS=-DSMB_PASSWD -DSMB_PASSWD_FILE=\"$(BASEDIR)/private/smbpasswd\"
- +# PASSWD_FLAGS=-DSMB_PASSWD=\"$(BINDIR)/smbpasswd\" -DSMB_PASSWD_FILE=\"$(BASEDIR)/private/smbpasswd\"
-
- ######################################
- # VTP-Support
- @@ -171,7 +174,7 @@
-
- # This is for SVR4
- # Contributed by mark@scot1.ucsalf.ac.uk
- -# FLAGSM = -DSVR4 -DSHADOW_PWD
- +# FLAGSM = -DSVR4 -DSHADOW_PWD -DALLOW_CHANGE_PASSWORD
- # LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb
-
-
- @@ -277,21 +280,23 @@
- # LIBSM = -lcrypt
-
-
- -# This is for NeXT. Note that versions of NeXT less than 3.2
- -# don't properly support posix, so they may present problems
- -# contributed by lendecke@namu01.gwdg.de
- -# FLAGSM = -DNEXT -posix
- -# LIBSM =
- -
- -# This is for NeXT OS 2.x
- -# No Posix, use 'cc' for C compiler (CC above).
- +# This is for NEXTSTEP Release 2.X
- +# No Posix.
- # contributed by brad@cac.washington.edu (Brad Greer)
- # FLAGSM = -DNEXT2
- # LIBSM =
-
- -# This is for NeXT OS 3.0
- -# No Posix, use 'cc' for C compiler (CC above).
- +# This is for NEXTSTEP Release 3.0 and greater (including OPENSTEP for Mach).
- # contributed by brad@cac.washington.edu (Brad Greer)
- +# additional configuration by pmarcos@next.com (Paul Marcos)
- +# For compiling n-way fat executables, you should append the appropriat -arch
- +# flags to the FLAGSM variable. Valid flags are:
- +# -arch m68k
- +# -arch i386
- +# -arch hppa
- +# -arch sparc
- +# To compile 4-way fat, you would append
- +# -arch m68k -arch i386 -arch hppa -arch sparc
- # FLAGSM = -DNEXT3_0
- # LIBSM =
-
- @@ -351,6 +356,12 @@
- # FLAGSM = -DSCO -DSHADOW_PWD
- # LIBSM = -lsec -lsocket /usr/lib/libcrypt_i.a -lintl
-
- +# Use this for SCO OpenServer 5 with TCB passwords (default).
- +# contributed by Scott Michel <scottm@intime.intime.com>
- +# CC = cc -Xc
- +# FLAGSM = -DSCO -DSecureWare -DEVEREST -DUSE_MMAP
- +# LIBSM = -lprot -lcurses -lcrypt -lsocket -lPW -lm -lx -lc_s -lc
- +
-
- # This is for intergraph.
- # contributed by cjkiick@flinx.b11.ingr.com
- @@ -418,6 +429,16 @@
- # LIBSM =
-
-
- +# This is for SONY NEWS, NEWS-OS 4.2.x
- +# contributed by sky@sm.sony.co.jp (Katushi Sato)
- +# FLAGSM = -DNEWS42 -DKANJI=\"sjis\"
- +# LIBSM =
- +
- +# This is for OS/2 using EMX 0.9b
- +# Contributed by jasonr@pec.co.nz (Jason Rumney)
- +# FLAGSM = -DOS2
- +# LIBSM = -Zexe -lsocket
- +
-
- ######################################################################
- # DON'T EDIT BELOW THIS LINE
- @@ -438,7 +459,7 @@
- all : CHECK $(PROGS)
-
- CHECK :
- - @$(SHELL) checkos.sh $(FLAGSM)
- + @$(SHELL) $(srcdir)/checkos.sh $(FLAGSM)
- @echo "Using CFLAGS = $(CFLAGS)"
- @echo "Using LIBS = $(LIBS)"
-
- @@ -458,7 +479,7 @@
-
- .c.o: $(INCLUDES)
- @echo Compiling $*.c
- - @$(CC) $(CFLAGS) -c $*.c
- + @$(CC) $(CFLAGS) -c $(srcdir)/$*.c
-
- smbd: server.o $(SMBDOBJ)
- @echo Linking smbd
- @@ -499,14 +520,14 @@
- install: installbin installman
-
- installbin: all
- - @$(SHELL) installbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS) $(SCRIPTS)
- + @$(SHELL) $(srcdir)/installbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS) $(SCRIPTS)
-
- # revert to the previously installed version
- revert:
- - @$(SHELL) revert.sh $(BINDIR) $(PROGS) $(SCRIPTS)
- + @$(SHELL) $(srcdir)/revert.sh $(BINDIR) $(PROGS) $(SCRIPTS)
-
- installman:
- - @$(SHELL) installman.sh $(MANDIR)
- + @$(SHELL) $(srcdir)/installman.sh $(MANDIR)
-
- clean:
- rm -f core *.o *~ $(PROGS)
- diff -u -r --new-file last-version/source/change-log samba-1.9.15p7/source/change-log
- --- last-version/source/change-log Tue Dec 5 15:52:16 1995
- +++ samba-1.9.15p7/source/change-log Mon Jan 15 19:45:39 1996
- @@ -1729,11 +1729,36 @@
- changes to stop compiler warning from Timothy Hunt <tim@fsg.com>
- - fixed become_user() bug that led to incorrect permissions in
- some situations.
- -
- + - released p6
- + - is_8_3() fix from Charles Hoch <hoch@hplcgh.hpl.hp.com>
- + - nmblib bugfix from gmk@mhcnet.att.com (George Kull)
- + - aix pcap fix from Jon Christiansen <jchristi@sctcorp.com>
- + - added explicit sig_pipe() in server.c
- + - added domain logins option (not fully implemented)
- + - added HAVE_GMTOFF code
- + - got rid of PM_MAXLINE
- + - minor client fix from goggi@eflir (Gar≡ar Georg Nielsen)
- + - added SIGCLD_IGNORE for HPUX (from Tor Lillqvist
- + <tml@hemuli.tte.vtt.fi>)
- + - OSF/1 lpq patch from scooter@GENE.COM (Scooter Morris)
- + - NeXT patches from pmarcos@next.com (Paul Marcos)
- + - dstdiff patch to stop infinite loop from Erwin Authried (eauth@cso.co.at)
- + - password server option can now take a list of password servers
- + - patches to let samba run on OS/2 from Jason Rumney <jasonr@pec.co.nz>
- + - added domain logon and logon script suport
- + - SCO openserver 5 patches from Scott Michel <scottm@intime.intime.com>
- + - Makefile changes from Marty Leisner <leisner@sdsp.mc.xerox.com>
- + - chgpasswd changes from Roman Dumych <roman@nyxis.unibase.com>
- + for SVR4
- + - GUEST_SESSSETUP change from David.Chappell@mail.cc.trincoll.edu
-
- ==========
- todo:
-
- +reply only to own workgroup in server enum
- +
- +patch to compile with g++ and possibly solaris c++
- +
- nmbd needs to keep browse list uptodate by talking to the master if it loses
- an election as others may still think its a valid backup and use it to get
- lists.
- diff -u -r --new-file last-version/source/chgpasswd.c samba-1.9.15p7/source/chgpasswd.c
- --- last-version/source/chgpasswd.c Wed Nov 29 11:34:05 1995
- +++ samba-1.9.15p7/source/chgpasswd.c Mon Jan 15 19:20:28 1996
- @@ -39,10 +39,22 @@
- static int findpty(char **slave)
- {
- int master;
- +#ifdef SVR4
- + extern char *ptsname();
- +#else
- static char line[12] = "/dev/ptyXX";
- void *dirp;
- char *dpname;
- +#endif
-
- +#ifdef SVR4
- + if ((master = open("/dev/ptmx", O_RDWR)) >= 1) {
- + grantpt(master);
- + unlockpt(master);
- + *slave = ptsname(master);
- + return (master);
- + }
- +#else
- dirp = OpenDir("/dev");
- if (!dirp) return(-1);
- while ((dpname = ReadDirName(dirp)) != NULL) {
- @@ -58,13 +70,23 @@
- }
- }
- CloseDir(dirp);
- +#endif
- return (-1);
- }
-
- -static int dochild(int master,char *slavedev, char *passwordprogram)
- +static int dochild(int master,char *slavedev, char *name, char *passwordprogram)
- {
- int slave;
- struct termios stermios;
- + struct passwd *pass = Get_Pwnam(name,True);
- + int gid = pass->pw_gid;
- + int uid = pass->pw_uid;
- +
- +#ifdef USE_SETRES
- + setresuid(0,0,0);
- +#else
- + setuid(0);
- +#endif
-
- /* Start new session - gets rid of controlling terminal. */
- if (setsid() < 0) {
- @@ -74,13 +96,19 @@
-
- /* Open slave pty and acquire as new controlling terminal. */
- if ((slave = open(slavedev, O_RDWR)) < 0) {
- - DEBUG(3,("More weirdness, could not read/write to new pty\n"));
- + DEBUG(3,("More weirdness, could not open %s\n",
- + slavedev));
- return(False);
- }
- +#ifdef SVR4
- + ioctl(slave, I_PUSH, "ptem");
- + ioctl(slave, I_PUSH, "ldterm");
- +#else
- if (ioctl(slave,TIOCSCTTY,0) <0) {
- DEBUG(3,("Error in ioctl call for slave pty\n"));
- /* return(False); */
- }
- +#endif
-
- /* Close master. */
- close(master);
- @@ -116,6 +144,21 @@
- return(False);
- }
-
- + /* make us completely into the right uid */
- +#ifdef USE_SETRES
- + setresgid(0,0,0);
- + setresuid(0,0,0);
- + setresgid(gid,gid,gid);
- + setresuid(uid,uid,uid);
- +#else
- + setuid(0);
- + seteuid(0);
- + setgid(gid);
- + setegid(gid);
- + setuid(uid);
- + seteuid(uid);
- +#endif
- +
- /* execl() password-change application */
- if (execl("/bin/sh","sh","-c",passwordprogram,NULL) < 0) {
- DEBUG(3,("Bad status returned from %s\n",passwordprogram));
- @@ -257,30 +300,12 @@
-
- } else {
- /* CHILD */
- - struct passwd *pass = Get_Pwnam(name,True);
- - int gid = pass->pw_gid;
- - int uid = pass->pw_uid;
- -
- - /* make us completely into the right uid */
- -#ifdef USE_SETRES
- - setresgid(0,0,0);
- - setresuid(0,0,0);
- - setresgid(gid,gid,gid);
- - setresuid(uid,uid,uid);
- -#else
- - setuid(0);
- - seteuid(0);
- - setgid(gid);
- - setegid(gid);
- - setuid(uid);
- - seteuid(uid);
- -#endif
-
- /* make sure it doesn't freeze */
- alarm(20);
-
- DEBUG(3,("Dochild for user %s (uid=%d,gid=%d)\n",name,getuid(),getgid()));
- - chstat = dochild(master, slavedev, passwordprogram);
- + chstat = dochild(master, slavedev, name, passwordprogram);
- }
- DEBUG(3,("Password change %ssuccessful for user %s\n", (chstat?"":"un"), name));
- return (chstat);
- @@ -314,8 +339,13 @@
- return (False); /* inform the user */
- }
-
- +#if (defined(PASSWD_PROGRAM) && defined(PASSWD_CHAT))
- + strcpy(passwordprogram,PASSWD_PROGRAM);
- + strcpy(chatsequence,PASSWD_CHAT);
- +#else
- strcpy(passwordprogram,lp_passwd_program());
- strcpy(chatsequence,lp_passwd_chat());
- +#endif
-
- if (!*chatsequence) {
- DEBUG(2,("Null chat sequence - no password changing\n"));
- diff -u -r --new-file last-version/source/client.c samba-1.9.15p7/source/client.c
- --- last-version/source/client.c Mon Dec 4 11:47:53 1995
- +++ samba-1.9.15p7/source/client.c Mon Jan 15 19:56:44 1996
- @@ -2026,7 +2026,7 @@
- {
- struct stat st;
- if (!file_exist(lname,&st)) {
- - DEBUG(0,("%s does not exist\n"));
- + DEBUG(0,("%s does not exist\n",lname));
- return;
- }
- finfo.mtime = st.st_mtime;
- @@ -2906,6 +2906,10 @@
- outbuf = (char *)malloc(BUFFER_SIZE + SAFETY_MARGIN);
- }
-
- +#if AJT
- + if (strstr(service,"IPC$")) connect_as_ipc = True;
- +#endif
- +
- strcpy(dev,"A:");
- if (connect_as_printer)
- strcpy(dev,"LPT1:");
- @@ -3457,7 +3461,8 @@
- char *sname = p;
- int type = SVAL(p,14);
- int comment_offset = IVAL(p,16) & 0xFFFF;
- - fstring typestr="";
- + fstring typestr;
- + *typestr=0;
-
- switch (type)
- {
- @@ -3557,7 +3562,7 @@
- char *p;
- pstring param;
- int uLevel = 1;
- - int count = -1;
- + int count = 0;
-
- int servertype = SV_TYPE_ALL;
-
- @@ -3613,16 +3618,12 @@
- p += 26;
- }
- }
- - else
- - {
- - printf("\nThis machine does not have a browse list\n");
- - }
- }
-
- if (rparam) free(rparam);
- if (rdata) free(rdata);
-
- - return(True);
- + return(count>0);
- }
-
-
- @@ -4216,7 +4217,10 @@
- sleep(1);
- browse_host(True);
- }
- - list_servers();
- + if (!list_servers()) {
- + sleep(1);
- + list_servers();
- + }
-
- send_logout();
- close_sockets();
- diff -u -r --new-file last-version/source/clitar.c samba-1.9.15p7/source/clitar.c
- --- last-version/source/clitar.c Mon Dec 4 11:47:51 1995
- +++ samba-1.9.15p7/source/clitar.c Mon Jan 15 18:37:04 1996
- @@ -1069,9 +1069,11 @@
- /* *must* be called with buffer ready malloc'ed */
- /* ensures path exists */
-
- - pstring partpath="", ffname;
- + pstring partpath, ffname;
- char *p=fname, *basehack;
-
- + *partpath = 0;
- +
- /* fname copied to ffname so can strtok */
-
- strcpy(ffname, fname);
- @@ -1300,8 +1302,10 @@
- char *q;
- fstring buf;
- pstring fname;
- - int attra[2]={0, 0};
- + int attra[2];
- int direct=1;
- +
- + attra[0] = attra[1] = 0;
-
- if (!next_token(NULL,buf,NULL))
- {
- diff -u -r --new-file last-version/source/includes.h samba-1.9.15p7/source/includes.h
- --- last-version/source/includes.h Tue Dec 5 13:08:46 1995
- +++ samba-1.9.15p7/source/includes.h Mon Jan 15 19:15:36 1996
- @@ -1,3 +1,5 @@
- +#ifndef _INCLUDES_H
- +#define _INCLUDES_H
- /*
- Unix SMB/Netbios implementation.
- Version 1.9.
- @@ -89,6 +91,20 @@
- #endif
- #endif
-
- +#ifdef NEWS42
- +#define NO_UTIMEH
- +#define NO_STRFTIME
- +#define NO_UTIMBUF
- +#define REPLACE_MKTIME
- +#define NO_TM_NAME
- +#endif
- +
- +#ifdef OS2
- +#define NO_SYSMOUNTH
- +#define NO_NETIFH
- +#endif
- +
- +
- #if (defined(SHADOW_PWD)||defined(OSF1_ENH_SEC)||defined(SecureWare)||defined(PWDAUTH))
- #define PASSWORD_LENGTH 16
- #endif
- @@ -369,6 +385,8 @@
- #include <sys/filio.h>
- #include <fcntl.h>
- #include <sys/sockio.h>
- +#include <netinet/tcp.h>
- +#include <stropts.h>
- #include <termios.h>
- #define SYSV
- #define USE_WAITPID
- @@ -485,6 +503,7 @@
- #define USE_SETSID
- #define USE_SETRES
- #define DEFAULT_PRINTING PRINT_HPUX
- +#define SIGCLD_IGNORE
- #endif
-
-
- @@ -507,22 +526,6 @@
- #define USE_DIRECT
- #endif
-
- -
- -#ifdef NEXT
- -#include <strings.h>
- -#include <sys/dir.h>
- -#include <dirent.h>
- -#include <sys/vfs.h>
- -#define bzero(b,len) memset(b,0,len)
- -#include <libc.h>
- -#define NOSTRDUP
- -#define USE_WAITPID
- -#define NO_STRFTIME
- -#define USE_GETCWD
- -#define WAIT3_CAST1 (union wait *)
- -#endif
- -
- -
- #ifdef NEXT2
- #include <sys/types.h>
- #include <strings.h>
- @@ -548,6 +551,10 @@
- #define NOSTRDUP
- #define USE_DIRECT
- #define mode_t int
- +#define GID_TYPE int
- +#define gid_t int
- +#define SIGNAL_CAST (void (*)(int))
- +#define WAIT3_CAST1 (union wait *)
- #endif
-
-
- @@ -576,6 +583,10 @@
- #include <fcntl.h>
- #include <sys/statfs.h>
- #include <sys/stropts.h>
- +#include <limits.h>
- +#ifdef EVEREST
- +#include <unistd.h>
- +#endif
- #ifdef NETGROUP
- #include <rpcsvc/ypclnt.h>
- #endif
- @@ -585,7 +596,9 @@
- #include <prot.h>
- #define crypt bigcrypt
- #endif
- -#define ftruncate(f,l) syscall(0x0a28,f,l)
- +#ifndef EVEREST
- + #define ftruncate(f,l) syscall(0x0a28,f,l)
- +#endif
- #define SIGNAL_CAST (void (*)(int))
- #define USE_WAITPID
- #define USE_GETCWD
- @@ -593,11 +606,15 @@
- #ifdef SCO3_2_2
- #define NO_EID
- #else
- +#ifndef EVEREST
- #define USE_IFREQ
- #endif
- +#endif
- #define STATFS4
- #define NO_FSYNC
- +#ifndef EVEREST
- #define NO_INITGROUPS
- +#endif
- #define HAVE_PATHCONF
- #define NO_GETRLIMIT
- #endif
- @@ -788,6 +805,34 @@
- #endif
-
-
- +#ifdef NEWS42
- +#include <string.h>
- +#include <dirent.h>
- +#include <sys/vfs.h>
- +#include <sys/timeb.h>
- +typedef int mode_t;
- +#endif
- +
- +#ifdef OS2
- +#include <dirent.h>
- +#include <sys/statfs.h>
- +#include <string.h>
- +#include <limits.h>
- +#define SIGNAL_CAST (void (*)())
- +#define HAVE_FCNTL_LOCK 0
- +#define USE_WAITPID
- +#define NO_GET_BROADCAST
- +#define NO_EID
- +#define NO_SETGROUPS
- +#define NO_INITGROUPS
- +#define NO_CRYPT
- +#define NO_STATFS
- +#define NO_CHROOT
- +#define NO_CHOWN
- +#define strcasecmp stricmp
- +#define strncasecmp strnicmp
- +#endif
- +
-
- /*******************************************************************
- end of the platform specific sections
- @@ -1064,4 +1109,6 @@
-
- #define memcpy(d,s,l) memcpy_wrapped(d,s,l,__FILE__,__LINE__)
- void *memcpy_wrapped(void *d,void *s,int l,char *fname,int line);
- +#endif
- +
- #endif
- diff -u -r --new-file last-version/source/ipc.c samba-1.9.15p7/source/ipc.c
- --- last-version/source/ipc.c Sun Dec 3 00:17:42 1995
- +++ samba-1.9.15p7/source/ipc.c Mon Jan 15 16:24:54 1996
- @@ -794,8 +794,6 @@
- if (!next_token(&ptr,s->comment,NULL)) continue;
- if (sscanf(stype,"%X",&s->type) != 1) continue;
-
- - if (!s->type) s->type = SV_TYPE_SERVER;
- -
- if (!(servertype & s->type) ||
- ((s->type&SV_TYPE_DOMAIN_ENUM) &&
- !(servertype&SV_TYPE_DOMAIN_ENUM))) continue;
- @@ -1861,13 +1859,12 @@
- char *str1 = param+2;
- char *str2 = skip_string(str1,1);
- char *p = skip_string(str2,1);
- - int uLevel,cbBuf;
- + int uLevel;
- struct pack_desc desc;
- char* name;
-
- uLevel = SVAL(p,0);
- - cbBuf = SVAL(p,2);
- - name = p + 4;
- + name = p + 2;
-
- bzero(&desc,sizeof(desc));
-
- @@ -1887,19 +1884,25 @@
- PACKS(&desc,"B21",name); /* eff. name */
- PACKS(&desc,"B",""); /* pad */
- PACKI(&desc,"W",2); /* priv */
- - PACKI(&desc,"D",0); /* auth flags */
- + PACKI(&desc,"D",0); /* auth flags XXX */
- PACKI(&desc,"W",0); /* num logons */
- PACKI(&desc,"W",0); /* bad pw count */
- - PACKI(&desc,"D",0); /* last logon */
- - PACKI(&desc,"D",0); /* last logoff */
- + PACKI(&desc,"D",-1); /* last logon */
- + PACKI(&desc,"D",-1); /* last logoff */
- PACKI(&desc,"D",-1); /* logoff time */
- PACKI(&desc,"D",-1); /* kickoff time */
- PACKI(&desc,"D",0); /* password age */
- PACKI(&desc,"D",0); /* password can change */
- PACKI(&desc,"D",-1); /* password must change */
- - PACKS(&desc,"z",local_machine);/* computer */
- + {
- + fstring mypath;
- + strcpy(mypath,"\\\\");
- + strcat(mypath,local_machine);
- + strupper(mypath);
- + PACKS(&desc,"z",mypath); /* computer */
- + }
- PACKS(&desc,"z",my_workgroup());/* domain */
- - PACKS(&desc,"z",""); /* script path */
- + PACKS(&desc,"z",lp_logon_script()); /* script path */
- PACKI(&desc,"D",0); /* reserved */
- }
-
- diff -u -r --new-file last-version/source/loadparm.c samba-1.9.15p7/source/loadparm.c
- --- last-version/source/loadparm.c Tue Dec 5 15:05:25 1995
- +++ samba-1.9.15p7/source/loadparm.c Mon Jan 15 19:11:08 1996
- @@ -131,6 +131,7 @@
- char *szDomainController;
- char *szUsernameMap;
- char *szCharacterSet;
- + char *szLogonScript;
- int max_log_size;
- int mangled_stack;
- int max_xmit;
- @@ -148,6 +149,7 @@
- int max_ttl;
- BOOL bPreferredMaster;
- BOOL bDomainMaster;
- + BOOL bDomainLogons;
- BOOL bEncryptPasswords;
- BOOL bStripDot;
- BOOL bNullPasswords;
- @@ -389,6 +391,7 @@
- {"domain controller",P_STRING, P_GLOBAL, &Globals.szDomainController,NULL},
- {"username map", P_STRING, P_GLOBAL, &Globals.szUsernameMap, NULL},
- {"character set", P_STRING, P_GLOBAL, &Globals.szCharacterSet, handle_character_set},
- + {"logon script", P_STRING, P_GLOBAL, &Globals.szLogonScript, NULL},
- {"max log size", P_INTEGER, P_GLOBAL, &Globals.max_log_size, NULL},
- {"mangled stack", P_INTEGER, P_GLOBAL, &Globals.mangled_stack, NULL},
- {"max mux", P_INTEGER, P_GLOBAL, &Globals.max_mux, NULL},
- @@ -408,6 +411,7 @@
- {"preferred master", P_BOOL, P_GLOBAL, &Globals.bPreferredMaster, NULL},
- {"prefered master", P_BOOL, P_GLOBAL, &Globals.bPreferredMaster, NULL},
- {"domain master", P_BOOL, P_GLOBAL, &Globals.bDomainMaster, NULL},
- + {"domain logons", P_BOOL, P_GLOBAL, &Globals.bDomainLogons, NULL},
- {"browse list", P_BOOL, P_GLOBAL, &Globals.bBrowseList, NULL},
-
- {"-valid", P_BOOL, P_LOCAL, &sDefault.valid, NULL},
- @@ -526,7 +530,11 @@
- #endif
- string_set(&Globals.szPasswdChat,"*old*password* %o\\n *new*password* %n\\n *new*password* %n\\n *changed*");
- string_set(&Globals.szWorkGroup, WORKGROUP);
- +#ifdef SMB_PASSWD
- + string_set(&Globals.szPasswdProgram, SMB_PASSWD);
- +#else
- string_set(&Globals.szPasswdProgram, "/bin/passwd");
- +#endif
- string_set(&Globals.szPrintcapname, PRINTCAP_NAME);
- string_set(&Globals.szLockDir, LOCKDIR);
- string_set(&Globals.szRootdir, "/");
- @@ -558,6 +566,7 @@
- Globals.max_ttl = 60*60*4; /* 2 hours default */
- Globals.bPreferredMaster = True;
- Globals.bDomainMaster = False;
- + Globals.bDomainLogons = False;
- Globals.bBrowseList = True;
-
- #ifdef KANJI
- @@ -675,8 +684,10 @@
- FN_GLOBAL_STRING(lp_domain_controller,&Globals.szDomainController)
- FN_GLOBAL_STRING(lp_username_map,&Globals.szUsernameMap)
- FN_GLOBAL_STRING(lp_character_set,&Globals.szCharacterSet)
- +FN_GLOBAL_STRING(lp_logon_script,&Globals.szLogonScript)
-
- FN_GLOBAL_BOOL(lp_domain_master,&Globals.bDomainMaster)
- +FN_GLOBAL_BOOL(lp_domain_logons,&Globals.bDomainLogons)
- FN_GLOBAL_BOOL(lp_preferred_master,&Globals.bPreferredMaster)
- FN_GLOBAL_BOOL(lp_load_printers,&Globals.bLoadPrinters)
- FN_GLOBAL_BOOL(lp_use_rhosts,&Globals.bUseRhosts)
- diff -u -r --new-file last-version/source/loadparm.h samba-1.9.15p7/source/loadparm.h
- --- last-version/source/loadparm.h Sun Dec 3 00:17:16 1995
- +++ samba-1.9.15p7/source/loadparm.h Mon Jan 15 19:57:14 1996
- @@ -54,6 +54,7 @@
- extern char *lp_domain_controller(void);
- extern char *lp_username_map(void);
- extern char *lp_hosts_equiv(void);
- +extern char *lp_logon_script(void);
- extern char *lp_magicscript(int iService);
- extern char *lp_magicoutput(int iService);
- extern char *lp_mangled_map(int iService);
- @@ -66,6 +67,7 @@
- extern int lp_mangledstack(void);
- extern BOOL lp_preferred_master(void);
- extern BOOL lp_domain_master(void);
- +extern BOOL lp_domain_logons(void);
- extern BOOL lp_getwdcache(void);
- extern BOOL lp_use_rhosts(void);
- extern BOOL lp_readprediction(void);
- @@ -155,3 +157,4 @@
- char *my_workgroup(void);
-
- #endif
- +
- diff -u -r --new-file last-version/source/mangle.c samba-1.9.15p7/source/mangle.c
- --- last-version/source/mangle.c Sun Dec 3 19:29:18 1995
- +++ samba-1.9.15p7/source/mangle.c Thu Dec 7 10:23:53 1995
- @@ -82,12 +82,13 @@
- ****************************************************************************/
- BOOL is_8_3(char *fname)
- {
- - int len = strlen(fname);
- + int len;
- char *dot_pos;
- char *slash_pos = strrchr(fname,'/');
- int l;
-
- if (slash_pos) fname = slash_pos+1;
- + len = strlen(fname);
-
- dot_pos = strchr(fname,'.');
-
- diff -u -r --new-file last-version/source/nameserv.c samba-1.9.15p7/source/nameserv.c
- --- last-version/source/nameserv.c Mon Dec 4 11:48:17 1995
- +++ samba-1.9.15p7/source/nameserv.c Mon Jan 15 18:38:56 1996
- @@ -48,8 +48,8 @@
- static pstring host_file;
- static pstring myname="";
-
- -static int ClientNMB=-1;
- -static int ClientDGRAM=-1;
- +static int ClientNMB= -1;
- +static int ClientDGRAM= -1;
-
- static BOOL needannounce=True;
-
- @@ -110,6 +110,8 @@
-
- #define GET_TTL(ttl) ((ttl)?MIN(ttl,lp_max_ttl()):lp_max_ttl())
-
- +#define BROWSE_MAILSLOT "\\MAILSLOT\\BROWSE"
- +
- /****************************************************************************
- catch a sighup
- ****************************************************************************/
- @@ -154,7 +156,7 @@
- if ((p=strrchr(dname,'/'))) *p=0;
- strcat(dname,"/corefiles");
- mkdir(dname,0700);
- - chown(dname,getuid(),getgid());
- + sys_chown(dname,getuid(),getgid());
- chmod(dname,0700);
- if (chdir(dname)) return(False);
- umask(~(0700));
- @@ -451,7 +453,9 @@
- **************************************************************************/
- static void add_my_names(void)
- {
- - struct in_addr ip = *interpret_addr2("0.0.0.0");
- + struct in_addr ip;
- +
- + ip = *interpret_addr2("0.0.0.0");
-
- add_host_entry(myname,0x20,True,0,SELF,ip);
- add_host_entry(myname,0x0,True,0,SELF,ip);
- @@ -652,12 +656,14 @@
-
- {
- BOOL group=False;
- - string ip="",name="",flags="",extra="";
- + string ip,name,flags,extra;
- char *ptr;
- int count = 0;
- struct in_addr ipaddr;
- enum name_source source = LMHOSTS;
-
- + *ip = *name = *flags = *extra = 0;
- +
- ptr = line;
-
- if (next_token(&ptr,ip,NULL)) ++count;
- @@ -733,8 +739,8 @@
- strupper(p);
- p = skip_string(p,1);
-
- - send_udp_dgram(ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
- - name,group,0,0x1e,bcast_ip,myip);
- + send_mailslot_reply(BROWSE_MAILSLOT,ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
- + name,group,0,0x1e,bcast_ip,myip);
- }
-
-
- @@ -762,8 +768,8 @@
- strupper(p);
- p = skip_string(p,1) + 1;
-
- - send_udp_dgram(ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
- - myname,to->name,0,to->name_type,ip,myip);
- + send_mailslot_reply(BROWSE_MAILSLOT,ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
- + myname,to->name,0,to->name_type,ip,myip);
- }
-
-
- @@ -788,13 +794,11 @@
- add_host_entry(PrimaryGroup,0x1b,True,0,SELF,myip);
- add_host_entry(PrimaryGroup,0x1c,False,0,SELF,myip);
- ServerType |= SV_TYPE_DOMAIN_MASTER;
- -#if 0
- - ServerType |= SV_TYPE_DOMAIN_CTRL;
- - ServerType |= SV_TYPE_DOMAIN_MEMBER;
- - ServerType |= 0xFFFFFF;
- - domain_type |= SV_TYPE_DOMAIN_CTRL;
- - domain_type |= 0xFFFFFF;
- -#endif
- + if (lp_domain_logons()) {
- + ServerType |= SV_TYPE_DOMAIN_CTRL;
- + ServerType |= SV_TYPE_DOMAIN_MEMBER;
- + domain_type |= SV_TYPE_DOMAIN_CTRL;
- + }
- }
-
- add_server_entry(PrimaryGroup,domain_type,0,myname,True);
- @@ -817,6 +821,7 @@
- DEBUG(2,("Becoming non-master for %s\n",PrimaryGroup));
-
- ServerType &= ~SV_TYPE_MASTER_BROWSER;
- + ServerType &= ~SV_TYPE_DOMAIN_CTRL;
- ServerType &= ~SV_TYPE_DOMAIN_MASTER;
-
- ElectionCriterion &= ~0x4;
- @@ -925,8 +930,8 @@
- p += 31;
- p = skip_string(p,1);
-
- - send_udp_dgram(ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
- - my_name,d->name,0,0x1d,d->bcast_ip,myip);
- + send_mailslot_reply(BROWSE_MAILSLOT,ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
- + my_name,d->name,0,0x1d,d->bcast_ip,myip);
-
- /* if I'm the master then I also need to do a local master and
- domain announcement */
- @@ -939,8 +944,8 @@
- SIVAL(stypep,0,ServerType);
-
- CVAL(outbuf,0) = 15; /* local master announce */
- - send_udp_dgram(ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
- - my_name,PrimaryGroup,0,0x1e,d->bcast_ip,myip);
- + send_mailslot_reply(BROWSE_MAILSLOT,ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
- + my_name,PrimaryGroup,0,0x1e,d->bcast_ip,myip);
-
- CVAL(outbuf,0) = 12; /* domain announce */
- StrnCpy(namep,PrimaryGroup,15);
- @@ -950,8 +955,8 @@
- SIVAL(stypep,0,(unsigned)0x80000000);
- p = commentp + strlen(commentp) + 1;
-
- - send_udp_dgram(ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
- - my_name,MSBROWSE,0,1,d->bcast_ip,myip);
- + send_mailslot_reply(BROWSE_MAILSLOT,ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
- + my_name,MSBROWSE,0,1,d->bcast_ip,myip);
- }
- }
-
- @@ -978,8 +983,8 @@
- strupper(p);
- p = skip_string(p,1);
-
- - send_udp_dgram(ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
- - myname,group,0,0,bcast_ip,myip);
- + send_mailslot_reply(BROWSE_MAILSLOT,ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
- + myname,group,0,0,bcast_ip,myip);
- }
-
- /****************************************************************************
- @@ -992,7 +997,8 @@
- pstring outbuf;
- char *p;
- struct in_addr ip,pdc_ip;
- - fstring pdcname="";
- + fstring pdcname;
- + *pdcname = 0;
-
- if (!AM_MASTER || (last && (t-last < 10*60))) return;
- last = t;
- @@ -1029,8 +1035,8 @@
- strupper(p);
- p = skip_string(p,1);
-
- - send_udp_dgram(ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
- - PrimaryGroup,myname,0x1b,0,pdc_ip,myip);
- + send_mailslot_reply(BROWSE_MAILSLOT,ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
- + PrimaryGroup,myname,0x1b,0,pdc_ip,myip);
- }
-
-
- @@ -1278,6 +1284,78 @@
-
-
- /****************************************************************************
- + process a domain logon packet
- + **************************************************************************/
- +static void process_logon_packet(struct packet_struct *p,char *buf,int len)
- +{
- + char *logname,*q;
- + char *reply_name;
- + BOOL add_slashes = False;
- + pstring outbuf;
- + struct dgram_packet *dgram = &p->packet.dgram;
- + int code,reply_code;
- +
- + if (!lp_domain_logons()) {
- + DEBUG(3,("No domain logons\n"));
- + return;
- + }
- + if (!listening(&dgram->dest_name)) {
- + DEBUG(4,("Not listening to that domain\n"));
- + return;
- + }
- +
- + code = SVAL(buf,0);
- + switch (code) {
- + case 0:
- + {
- + char *machine = buf+2;
- + char *user = skip_string(machine,1);
- + logname = skip_string(user,1);
- + reply_code = 6;
- + reply_name = myname;
- + add_slashes = True;
- + DEBUG(3,("Domain login request from %s(%s) user=%s\n",
- + machine,inet_ntoa(p->ip),user));
- + }
- + break;
- + case 7:
- + {
- + char *machine = buf+2;
- + logname = skip_string(machine,1);
- + reply_code = 7;
- + reply_name = lp_domain_controller();
- + if (!*reply_name) {
- + DEBUG(3,("No domain controller configured\n"));
- + return;
- + }
- + DEBUG(3,("GETDC request from %s(%s)\n",
- + machine,inet_ntoa(p->ip)));
- + }
- + break;
- + default:
- + DEBUG(3,("Unknown domain request %d\n",code));
- + return;
- + }
- +
- + bzero(outbuf,sizeof(outbuf));
- + q = outbuf;
- + SSVAL(q,0,reply_code);
- + q += 2;
- + if (add_slashes) {
- + strcpy(q,"\\\\");
- + q += 2;
- + }
- + StrnCpy(q,reply_name,16);
- + strupper(q);
- + q = skip_string(q,1);
- + SSVAL(q,0,0xFFFF);
- + q += 2;
- +
- + send_mailslot_reply(logname,ClientDGRAM,outbuf,PTR_DIFF(q,outbuf),
- + myname,&dgram->source_name.name[0],0,0,p->ip,myip);
- +}
- +
- +/****************************************************************************
- process udp 138 datagrams
- ****************************************************************************/
- static void process_dgram(struct packet_struct *p)
- @@ -1307,12 +1385,14 @@
- namestr(&dgram->source_name),namestr(&dgram->dest_name),
- smb_buf(buf),CVAL(buf2,0),len));
-
- - /* only understand browse datagrams */
- - if (!strequal(smb_buf(buf),"\\MAILSLOT\\BROWSE"))
- - return;
- -
- if (len <= 0) return;
- - process_browse_packet(p,buf2,len);
- +
- + if (strequal(smb_buf(buf),"\\MAILSLOT\\BROWSE")) {
- + process_browse_packet(p,buf2,len);
- + } else if (strequal(smb_buf(buf),"\\MAILSLOT\\NET\\NETLOGON")) {
- + process_logon_packet(p,buf2,len);
- + }
- +
- }
-
- /*******************************************************************
- @@ -2054,6 +2134,7 @@
- printf("\t-B broadcast address the address to use for broadcasts\n");
- printf("\t-N netmask the netmask to use for subnet determination\n");
- printf("\t-H hosts file load a netbios hosts file\n");
- + printf("\t-I ip-address override the IP address\n");
- printf("\t-G group name add a group name to be part of\n");
- printf("\t-C comment sets the machine comment that appears in browse lists\n");
- printf("\n");
- diff -u -r --new-file last-version/source/nameserv.h samba-1.9.15p7/source/nameserv.h
- --- last-version/source/nameserv.h Wed Nov 22 18:32:05 1995
- +++ samba-1.9.15p7/source/nameserv.h Mon Jan 15 13:59:59 1996
- @@ -176,9 +176,9 @@
- BOOL name_status(int fd,char *name,int name_type,BOOL recurse,
- struct in_addr to_ip,char *master,char *rname,
- void (*fn)());
- -BOOL send_udp_dgram(int fd,char *buf,int len,
- - char *srcname,char *dstname,
- - int src_type,int dest_type,
- - struct in_addr dest_ip,
- - struct in_addr src_ip);
- +BOOL send_mailslot_reply(char *mailslot,int fd,char *buf,int len,
- + char *srcname,char *dstname,
- + int src_type,int dest_type,
- + struct in_addr dest_ip,
- + struct in_addr src_ip);
- char *namestr(struct nmb_name *n);
- diff -u -r --new-file last-version/source/nmblib.c samba-1.9.15p7/source/nmblib.c
- --- last-version/source/nmblib.c Mon Dec 4 16:51:42 1995
- +++ samba-1.9.15p7/source/nmblib.c Mon Jan 15 18:39:22 1996
- @@ -365,7 +365,8 @@
- ******************************************************************/
- void free_packet(struct packet_struct *packet)
- {
- - free_nmb_packet(&packet->packet.nmb);
- + if (packet->packet_type == NMB_PACKET)
- + free_nmb_packet(&packet->packet.nmb);
- free(packet);
- }
-
- @@ -623,7 +624,8 @@
- {
- char qname[17];
- int type;
- - fstring flags="";
- + fstring flags;
- + *flags = 0;
- StrnCpy(qname,p,15);
- type = CVAL(p,15);
- p += 16;
- @@ -871,11 +873,11 @@
- Note that this currently sends all answers to port 138. thats the
- wrong things to do! I should send to the requestors port. XXX
- **************************************************************************/
- -BOOL send_udp_dgram(int fd,char *buf,int len,
- - char *srcname,char *dstname,
- - int src_type,int dest_type,
- - struct in_addr dest_ip,
- - struct in_addr src_ip)
- +BOOL send_mailslot_reply(char *mailslot,int fd,char *buf,int len,
- + char *srcname,char *dstname,
- + int src_type,int dest_type,
- + struct in_addr dest_ip,
- + struct in_addr src_ip)
- {
- struct packet_struct p;
- struct dgram_packet *dgram = &p.packet.dgram;
- @@ -908,13 +910,13 @@
- CVAL(ptr,smb_com) = SMBtrans;
- SSVAL(ptr,smb_vwv1,len);
- SSVAL(ptr,smb_vwv11,len);
- - SSVAL(ptr,smb_vwv12,86);
- + SSVAL(ptr,smb_vwv12,70 + strlen(mailslot));
- SSVAL(ptr,smb_vwv13,3);
- SSVAL(ptr,smb_vwv14,1);
- SSVAL(ptr,smb_vwv15,1);
- SSVAL(ptr,smb_vwv16,2);
- p2 = smb_buf(ptr);
- - strcpy(p2,"\\MAILSLOT\\BROWSE");
- + strcpy(p2,mailslot);
- p2 = skip_string(p2,1);
-
- memcpy(p2,buf,len);
- diff -u -r --new-file last-version/source/params.c samba-1.9.15p7/source/params.c
- --- last-version/source/params.c Thu Jul 6 17:27:20 1995
- +++ samba-1.9.15p7/source/params.c Mon Jan 8 12:21:23 1996
- @@ -81,7 +81,7 @@
- **************************************************************************/
- static BOOL enumerate_parameters(FILE *fileIn, PM_PARMFUNC pfunc)
- {
- - char szBuf[PM_MAXLINE + 1];
- + pstring szBuf;
- char *pszTemp;
- BOOL bRetval;
- long lFileOffset;
- @@ -96,7 +96,7 @@
- if ((lFileOffset = ftell(fileIn)) >= 0L)
- {
- /* then get and check a line */
- - if (fgets_slash(szBuf, PM_MAXLINE, fileIn) == NULL)
- + if (fgets_slash(szBuf, sizeof(szBuf)-1, fileIn) == NULL)
- {
- /* stop - return OK unless file error */
- bRetval = !ferror(fileIn);
- @@ -189,7 +189,7 @@
- static BOOL enumerate_sections(FILE *fileIn,
- PM_SECFUNC sfunc, PM_PARMFUNC pfunc)
- {
- - char szBuf[PM_MAXLINE + 1];
- + pstring szBuf;
- BOOL bRetval;
- BOOL bSectionFound;
-
- @@ -200,7 +200,7 @@
- bSectionFound = False;
- while (True)
- {
- - if (fgets_slash(szBuf, PM_MAXLINE, fileIn) == NULL)
- + if (fgets_slash(szBuf, sizeof(szBuf)-1, fileIn) == NULL)
- {
- /* stop - return OK unless file error */
- bRetval = !ferror(fileIn);
- diff -u -r --new-file last-version/source/params.h samba-1.9.15p7/source/params.h
- --- last-version/source/params.h Thu Jun 29 18:13:37 1995
- +++ samba-1.9.15p7/source/params.h Mon Jan 8 12:20:35 1996
- @@ -35,8 +35,6 @@
- typedef BOOL (* PM_PARMFUNC)(char *pszParmName, char *pszParmValue);
- typedef BOOL (* PM_SECFUNC)(char *pszSectionName);
-
- -#define PM_MAXLINE 512
- -
- #define PM_NOFILE 1
- #define PM_NOFILENAME 2
- #define PM_FILEERROR 3
- diff -u -r --new-file last-version/source/password.c samba-1.9.15p7/source/password.c
- --- last-version/source/password.c Sun Dec 3 19:27:35 1995
- +++ samba-1.9.15p7/source/password.c Mon Jan 15 13:04:50 1996
- @@ -546,7 +546,12 @@
- return(linux_bigcrypt(password,this_salt,this_crypted));
- #endif
-
- +#ifdef NO_CRYPT
- + DEBUG(1,("Warning - no crypt available\n"));
- + return(False);
- +#else
- return(strcmp((char *)crypt(password,this_salt),this_crypted) == 0);
- +#endif
- }
-
- #ifdef SMB_PASSWD
- @@ -711,7 +716,14 @@
-
- #ifdef SHADOW_PWD
- {
- - struct spwd *spass = getspnam(pass->pw_name);
- + struct spwd *spass;
- +
- + /* many shadow systems require you to be root to get the password,
- + in most cases this should already be the case when this
- + function is called, except perhaps for IPC password changing
- + requests */
- +
- + spass = getspnam(pass->pw_name);
- if (spass && spass->sp_pwdp)
- pass->pw_passwd = spass->sp_pwdp;
- }
- @@ -1223,6 +1235,7 @@
-
-
- static int password_client = -1;
- +static fstring pserver;
-
- /****************************************************************************
- attempted support for server level security
- @@ -1238,13 +1251,11 @@
- struct in_addr dest_ip;
- extern struct in_addr myip;
- int port = 139;
- - char *pserver = lp_passwordserver();
- BOOL ret;
-
- - if (password_client >= 0) {
- + if (password_client >= 0)
- close(password_client);
- - password_client= -1;
- - }
- + password_client = -1;
-
- if (Protocol < PROTOCOL_NT1) {
- strcpy(pass_protocol,"LM1.2X002");
- @@ -1255,28 +1266,35 @@
- bzero(inbuf,sizeof(inbuf));
- bzero(outbuf,sizeof(outbuf));
-
- - strcpy(desthost,pserver);
- - standard_sub_basic(desthost);
- - strupper(desthost);
- -
- - dest_ip = *interpret_addr2(desthost);
- - if (zero_ip(dest_ip)) {
- - DEBUG(1,("Can't find password server\n"));
- - return(False);
- - }
- -
- - if (memcmp(&dest_ip,&myip,sizeof(dest_ip)) == 0) {
- - DEBUG(1,("Password server loop - disabling password server\n"));
- - return(False);
- + for (p=strtok(lp_passwordserver(),LIST_SEP); p ; p = strtok(NULL,LIST_SEP)) {
- + strcpy(desthost,p);
- + standard_sub_basic(desthost);
- + strupper(desthost);
- +
- + dest_ip = *interpret_addr2(desthost);
- + if (zero_ip(dest_ip)) {
- + DEBUG(1,("Can't resolve address for %s\n",p));
- + continue;
- + }
- +
- + if (memcmp(&dest_ip,&myip,sizeof(dest_ip)) == 0) {
- + DEBUG(1,("Password server loop - disabling password server %s\n",p));
- + continue;
- + }
- +
- + password_client = open_socket_out(SOCK_STREAM, &dest_ip, port);
- + if (password_client >= 0) {
- + DEBUG(3,("connected to password server %s\n",p));
- + StrnCpy(pserver,p,sizeof(pserver)-1);
- + break;
- + }
- }
-
- - password_client = open_socket_out(SOCK_STREAM, &dest_ip, port);
- if (password_client < 0) {
- - DEBUG(1,("%s not available\n",pserver));
- + DEBUG(1,("password server not available\n"));
- return(False);
- }
-
- - DEBUG(3,("connected to password server %s\n",pserver));
-
- /* send a session request (RFC 8002) */
-
- @@ -1345,7 +1363,6 @@
- BOOL server_validate(char *buf)
- {
- pstring inbuf,outbuf;
- - char *pserver = lp_passwordserver();
- BOOL ret;
-
- if (password_client < 0) {
- diff -u -r --new-file last-version/source/pcap.c samba-1.9.15p7/source/pcap.c
- --- last-version/source/pcap.c Fri Nov 24 11:59:49 1995
- +++ samba-1.9.15p7/source/pcap.c Tue Dec 12 13:21:01 1995
- @@ -117,7 +117,7 @@
- if ((p=strchr(line,':')))
- {
- *p = '\0';
- - p = strtok(line,':');
- + p = strtok(line,":");
- if (strcmp(p,"bsh")!=0)
- {
- strcpy(name,p);
- diff -u -r --new-file last-version/source/printing.c samba-1.9.15p7/source/printing.c
- --- last-version/source/printing.c Mon Dec 4 10:49:03 1995
- +++ samba-1.9.15p7/source/printing.c Mon Jan 15 12:29:51 1996
- @@ -196,49 +196,83 @@
- Warning: no daemon present
- Rank Owner Job Files Total Size
- 1st tridge 148 README 8096 bytes
- +
- +here is an example of lpq output under osf/1
- +
- +Warning: no daemon present
- +Rank Pri Owner Job Files Total Size
- +1st 0 tridge 148 README 8096 bytes
- ****************************************************************************/
- static BOOL parse_lpq_bsd(char *line,print_queue_struct *buf,BOOL first)
- {
- - string tok[5];
- +#ifdef OSF1
- +#define RANKTOK 0
- +#define PRIOTOK 1
- +#define USERTOK 2
- +#define JOBTOK 3
- +#define FILETOK 4
- +#define TOTALTOK 5
- +#define NTOK 6
- +#else /* OSF1 */
- +#define RANKTOK 0
- +#define USERTOK 1
- +#define JOBTOK 2
- +#define FILETOK 3
- +#define TOTALTOK 4
- +#define NTOK 5
- +#endif /* OSF1 */
- +
- + string tok[NTOK];
- int count=0;
-
- +#ifdef OSF1
- + int length;
- + length = strlen(line);
- + if (line[length-3] == ':')
- + return(False);
- +#endif /* OSF1 */
- +
- /* handle the case of "(standard input)" as a filename */
- string_sub(line,"standard input","STDIN");
- string_sub(line,"(","\"");
- string_sub(line,")","\"");
-
- - for (count=0; count<5 && next_token(&line,tok[count],NULL); count++) ;
- + for (count=0; count<NTOK && next_token(&line,tok[count],NULL); count++) ;
-
- - /* we must get 5 tokens */
- - if (count < 5)
- + /* we must get NTOK tokens */
- + if (count < NTOK)
- return(False);
-
- - /* the 3rd and 5th columns must be integer */
- - if (!isdigit(*tok[2]) || !isdigit(*tok[4])) return(False);
- + /* the Job and Total columns must be integer */
- + if (!isdigit(*tok[JOBTOK]) || !isdigit(*tok[TOTALTOK])) return(False);
-
- /* if the fname contains a space then use STDIN */
- - if (strchr(tok[3],' '))
- - strcpy(tok[3],"STDIN");
- + if (strchr(tok[FILETOK],' '))
- + strcpy(tok[FILETOK],"STDIN");
-
- /* only take the last part of the filename */
- {
- string tmp;
- - char *p = strrchr(tok[3],'/');
- + char *p = strrchr(tok[FILETOK],'/');
- if (p)
- {
- strcpy(tmp,p+1);
- - strcpy(tok[3],tmp);
- + strcpy(tok[FILETOK],tmp);
- }
- }
-
-
- - buf->job = atoi(tok[2]);
- - buf->size = atoi(tok[4]);
- - buf->status = strequal(tok[0],"active")?LPQ_PRINTING:LPQ_QUEUED;
- - buf->priority = 0;
- + buf->job = atoi(tok[JOBTOK]);
- + buf->size = atoi(tok[TOTALTOK]);
- + buf->status = strequal(tok[RANKTOK],"active")?LPQ_PRINTING:LPQ_QUEUED;
- buf->time = time(NULL);
- - StrnCpy(buf->user,tok[1],sizeof(buf->user)-1);
- - StrnCpy(buf->file,tok[3],sizeof(buf->file)-1);
- + StrnCpy(buf->user,tok[USERTOK],sizeof(buf->user)-1);
- + StrnCpy(buf->file,tok[FILETOK],sizeof(buf->file)-1);
- +#ifdef PRIOTOK
- + buf->priority = atoi(tok[PRIOTOK]);
- +#else
- + buf->priority = 1;
- +#endif
- return(True);
- }
-
- diff -u -r --new-file last-version/source/reply.c samba-1.9.15p7/source/reply.c
- --- last-version/source/reply.c Sun Dec 3 19:27:15 1995
- +++ samba-1.9.15p7/source/reply.c Mon Jan 15 19:32:57 1996
- @@ -363,19 +363,19 @@
- guest = True;
-
- /* now check if it's a valid username/password */
- - /* If an NT password was supplied try and validate with that
- - first. This is superior as the passwords are mixed case 128 length unicode */
- - if(smb_ntpasslen && !guest)
- + /* If an NT password was supplied try and validate with that
- + first. This is superior as the passwords are mixed case 128 length unicode */
- + if(smb_ntpasslen && !guest)
- {
- - if(!password_ok(user,smb_ntpasswd,smb_ntpasslen,NULL,True))
- - DEBUG(0,("NT Password did not match ! Defaulting to Lanman\n"));
- - else
- - valid_nt_password = True;
- + if(!password_ok(user,smb_ntpasswd,smb_ntpasslen,NULL,True))
- + DEBUG(0,("NT Password did not match ! Defaulting to Lanman\n"));
- + else
- + valid_nt_password = True;
- }
- - if (!valid_nt_password && !guest && !password_ok(user,smb_apasswd,smb_apasslen,NULL,False))
- + if (!valid_nt_password && !guest && !password_ok(user,smb_apasswd,smb_apasslen,NULL,False))
- {
- #if !GUEST_SESSSETUP
- - if (lp_security() >= SEC_USER)
- + if (lp_security() >= SEC_USER && Get_Pwnam(user,True))
- return(ERROR(ERRSRV,ERRbadpw));
- #endif
- if (*smb_apasswd || !Get_Pwnam(user,True))
- diff -u -r --new-file last-version/source/server.c samba-1.9.15p7/source/server.c
- --- last-version/source/server.c Tue Dec 5 15:57:11 1995
- +++ samba-1.9.15p7/source/server.c Mon Jan 15 13:08:53 1996
- @@ -435,7 +435,7 @@
-
- /* now match each part of the path name separately, trying the names
- as is first, then trying to scan the directory for matching names */
- - for (;start;start = (end?end+1:NULL))
- + for (;start;start = (end?end+1:(char *)NULL))
- {
- /* pinpoint the end of this section of the filename */
- end = strchr(start, '/');
- @@ -712,6 +712,7 @@
- int disk_free(char *path,int *bsize,int *dfree,int *dsize)
- {
- char *df_command = lp_dfree_command();
- +#ifndef NO_STATFS
- #ifdef USE_STATVFS
- struct statvfs fs;
- #else
- @@ -721,6 +722,7 @@
- struct statfs fs;
- #endif
- #endif
- +#endif
-
- #ifdef QUOTAS
- if (disk_quotas(path, bsize, dfree, dsize))
- @@ -764,7 +766,10 @@
- return(((*bsize)/1024)*(*dfree));
- }
-
- -
- +#ifdef NO_STATFS
- + DEBUG(1,("Warning - no statfs function\n"));
- + return(1);
- +#else
- #ifdef STATFS4
- if (statfs(path,&fs,sizeof(fs),0) != 0)
- #else
- @@ -829,6 +834,7 @@
- *dfree = MAX(1,*dfree);
- }
- return(((*bsize)/1024)*(*dfree));
- +#endif
- }
-
-
- @@ -992,7 +998,10 @@
-
- if (Files[fnum].fd >= 0)
- {
- + struct stat st;
- Connections[cnum].num_files_open++;
- + fstat(Files[fnum].fd,&st);
- + Files[fnum].mode = st.st_mode;
- Files[fnum].open_time = time(NULL);
- Files[fnum].size = 0;
- Files[fnum].pos = -1;
- @@ -2018,6 +2027,14 @@
- }
- #endif
-
- +/****************************************************************************
- + this is called when the client exits abruptly
- + **************************************************************************/
- +static int sig_pipe()
- +{
- + exit_server("Got sigpipe\n");
- + return(0);
- +}
-
- /****************************************************************************
- open the socket communication
- @@ -2070,7 +2087,7 @@
-
- #ifdef NO_FORK_DEBUG
- #ifndef NO_SIGNAL_TEST
- - signal(SIGPIPE, SIGNAL_CAST Abort);
- + signal(SIGPIPE, SIGNAL_CAST sig_pipe);
- signal(SIGCLD, SIGNAL_CAST SIG_DFL);
- #endif
- return True;
- @@ -2078,7 +2095,7 @@
- if (Client != -1 && fork()==0)
- {
- #ifndef NO_SIGNAL_TEST
- - signal(SIGPIPE, SIGNAL_CAST Abort);
- + signal(SIGPIPE, SIGNAL_CAST sig_pipe);
- signal(SIGCLD, SIGNAL_CAST SIG_DFL);
- #endif
- /* close our standard file descriptors */
- @@ -2098,7 +2115,7 @@
- /* We will abort gracefully when the client or remote system
- goes away */
- #ifndef NO_SIGNAL_TEST
- - signal(SIGPIPE, SIGNAL_CAST Abort);
- + signal(SIGPIPE, SIGNAL_CAST sig_pipe);
- #endif
- Client = dup(0);
-
- @@ -2850,7 +2867,7 @@
- {
- extern fstring remote_arch;
- int outsize = set_message(outbuf,1,0,True);
- - int Index;
- + int Index=0;
- int choice= -1;
- int protocol;
- char *p;
- @@ -2861,7 +2878,7 @@
- while (p < (smb_buf(inbuf) + bcc))
- {
- Index++;
- - DEBUG(1,("Requested protocol [%s]\n",p));
- + DEBUG(3,("Requested protocol [%s]\n",p));
- if (strcsequal(p,"Windows for Workgroups 3.1a"))
- arch &= ( ARCH_WFWG | ARCH_WIN95 | ARCH_WINNT );
- else if (strcsequal(p,"DOS LM1.2X002"))
- @@ -2938,7 +2955,7 @@
- strcpy(remote_proto,supported_protocols[protocol].short_name);
- reload_services(True);
- outsize = supported_protocols[protocol].proto_reply_fn(outbuf);
- - DEBUG(1,("Selected protocol %s\n",supported_protocols[protocol].proto_name));
- + DEBUG(3,("Selected protocol %s\n",supported_protocols[protocol].proto_name));
- }
- else {
- DEBUG(0,("No protocol supported !\n"));
- @@ -3261,7 +3278,7 @@
- if ((p=strrchr(dname,'/'))) *p=0;
- strcat(dname,"/corefiles");
- mkdir(dname,0700);
- - chown(dname,getuid(),getgid());
- + sys_chown(dname,getuid(),getgid());
- chmod(dname,0700);
- if (chdir(dname)) return(False);
- umask(~(0700));
- @@ -3297,7 +3314,7 @@
- firsttime = 0;
-
- unbecome_user();
- - DEBUG(1,("Closing connections\n"));
- + DEBUG(2,("Closing connections\n"));
- for (i=0;i<MAX_CONNECTIONS;i++)
- if (Connections[i].open)
- close_cnum(i,-1);
- @@ -4145,9 +4162,7 @@
-
- if (*lp_rootdir())
- {
- - chroot(lp_rootdir());
- -
- - if (DEBUGLEVEL > 1)
- + if (sys_chroot(lp_rootdir()) == 0)
- DEBUG(2,("%s changed root to %s\n",timestring(),lp_rootdir()));
- }
-
- diff -u -r --new-file last-version/source/smb.h samba-1.9.15p7/source/smb.h
- --- last-version/source/smb.h Mon Dec 4 11:47:31 1995
- +++ samba-1.9.15p7/source/smb.h Mon Jan 15 14:14:46 1996
- @@ -242,24 +242,25 @@
- } write_bmpx_struct;
-
- typedef struct
- - {
- - int cnum;
- - int fd;
- - int pos;
- - int size;
- - char *mmap_ptr;
- - int mmap_size;
- - write_bmpx_struct *wbmpx_ptr;
- - time_t open_time;
- - BOOL open;
- - BOOL can_lock;
- - BOOL can_read;
- - BOOL can_write;
- - BOOL share_mode;
- - BOOL share_pending;
- - BOOL print_file;
- - char *name;
- - } files_struct;
- +{
- + int cnum;
- + int fd;
- + int pos;
- + int size;
- + int mode;
- + char *mmap_ptr;
- + int mmap_size;
- + write_bmpx_struct *wbmpx_ptr;
- + time_t open_time;
- + BOOL open;
- + BOOL can_lock;
- + BOOL can_read;
- + BOOL can_write;
- + BOOL share_mode;
- + BOOL share_pending;
- + BOOL print_file;
- + char *name;
- +} files_struct;
-
-
- struct uid_cache {
- @@ -658,6 +659,8 @@
- void del_printqueue(int cnum,int snum,int jobid);
- BOOL strisnormal(char *s);
- BOOL check_mangled_stack(char *s);
- +int sys_chown(char *fname,int uid,int gid);
- +int sys_chroot(char *dname);
- BOOL next_token(char **ptr,char *buff,char *sep);
- void invalidate_uid(int uid);
- char *fgets_slash(char *s,int maxlen,FILE *f);
- @@ -666,7 +669,7 @@
- BOOL process_exists(int pid);
- BOOL chgpasswd(char *name,char *oldpass,char *newpass);
- void array_promote(char *array,int elsize,int element);
- -void string_replace(char *s,char old,char new);
- +void string_replace(char *s,char oldc,char newc);
- BOOL user_in_list(char *user,char *list);
- BOOL string_sub(char *s,char *pattern,char *insert);
- char *StrnCpy(char *dest,const char *src,int n);
- @@ -774,7 +777,7 @@
- BOOL reduce_name(char *s,char *dir,BOOL widelinks);
- void strlower(char *s);
- void strnorm(char *s);
- -char *smb_buf();
- +char *smb_buf(char *buf);
- char *smb_trans2_param(char *buf);
- char *smb_trans2_data(char *buf);
- BOOL strequal(char *,char *);
- diff -u -r --new-file last-version/source/status.c samba-1.9.15p7/source/status.c
- --- last-version/source/status.c Sat Dec 2 19:32:46 1995
- +++ samba-1.9.15p7/source/status.c Mon Jan 15 18:40:10 1996
- @@ -46,7 +46,7 @@
- int main(int argc, char *argv[])
- {
- FILE *f;
- - pstring fname="";
- + pstring fname;
- int uid, c, n;
- static pstring servicesf = CONFIGFILE;
- extern char *optarg;
- diff -u -r --new-file last-version/source/system.c samba-1.9.15p7/source/system.c
- --- last-version/source/system.c Mon Nov 13 17:35:06 1995
- +++ samba-1.9.15p7/source/system.c Mon Jan 15 13:12:05 1996
- @@ -199,3 +199,26 @@
- }
-
-
- +/*******************************************************************
- +chown isn't used much but OS/2 doesn't have it
- +********************************************************************/
- +int sys_chown(char *fname,int uid,int gid)
- +{
- +#ifdef NO_CHOWN
- + DEBUG(1,("Warning - chown(%s,%d,%d) not done\n",fname,uid,gid));
- +#else
- + return(chown(fname,uid,gid));
- +#endif
- +}
- +
- +/*******************************************************************
- +os/2 also doesn't have chroot
- +********************************************************************/
- +int sys_chroot(char *dname)
- +{
- +#ifdef NO_CHROOT
- + DEBUG(1,("Warning - chroot(%s) not done\n",dname));
- +#else
- + return(chroot(dname));
- +#endif
- +}
- diff -u -r --new-file last-version/source/username.c samba-1.9.15p7/source/username.c
- --- last-version/source/username.c Mon Nov 13 16:30:59 1995
- +++ samba-1.9.15p7/source/username.c Sun Jan 14 18:12:47 1996
- @@ -128,14 +128,6 @@
- }
- #endif
-
- -#if defined(NEXT)&&defined(i386)
- - /* Workaround for NS 3.2 posix bug in getpwnam() */
- - if (!ret->pw_uid && ret->pw_short_pad1)
- - ret->pw_uid = ret->pw_short_pad1;
- - if (!ret->pw_gid && ret->pw_short_pad2)
- - ret->pw_gid = ret->pw_short_pad2;
- -#endif
- -
- }
-
- return(ret);
- diff -u -r --new-file last-version/source/util.c samba-1.9.15p7/source/util.c
- --- last-version/source/util.c Tue Dec 5 13:19:19 1995
- +++ samba-1.9.15p7/source/util.c Mon Jan 15 19:44:25 1996
- @@ -419,7 +419,11 @@
- tm_utc = *(gmtime(&t));
- tm_local = *(localtime(&t));
-
- +#ifdef HAVE_GMTOFF
- + timediff = -tm_local.tm_gmtoff;
- +#else
- timediff = mktime(&tm_utc) - mktime(&tm_local);
- +#endif
-
- if (serverzone == 0) {
- serverzone = timediff - DSTDiff(t);
- @@ -469,7 +473,7 @@
-
- /* widen the new entry using two bisection searches */
- while (low+60*60 < dst_table[i].start) {
- - t = ((low + dst_table[i].start)/2);
- + t = low + (dst_table[i].start-low)/2;
- if ((localtime(&t)->tm_isdst?True:False) == is_dst)
- dst_table[i].start = t;
- else
- @@ -477,7 +481,7 @@
- }
-
- while (high-60*60 > dst_table[i].end) {
- - t = ((high + dst_table[i].end)/2);
- + t = high + (high-dst_table[i].end)/2;
- if ((localtime(&t)->tm_isdst?True:False) == is_dst)
- dst_table[i].end = t;
- else
- @@ -1294,7 +1298,7 @@
- /****************************************************************************
- string replace
- ****************************************************************************/
- -void string_replace(char *s,char old,char new)
- +void string_replace(char *s,char oldc,char newc)
- {
- while (*s)
- {
- @@ -1304,13 +1308,13 @@
- } else if (is_kana (*s)) {
- s++;
- } else {
- - if (old == *s)
- - *s = new;
- + if (oldc == *s)
- + *s = newc;
- s++;
- }
- #else
- - if (old == *s)
- - *s = new;
- + if (oldc == *s)
- + *s = newc;
- s++;
- #endif /* KANJI */
- }
- @@ -2118,19 +2122,19 @@
- ****************************************************************************/
- static int tval_sub( struct timeval *retval, struct timeval *val1, struct timeval *val2)
- {
- - long usecdiff = val1->tv_usec - val2->tv_usec;
- - long secdiff = val1->tv_sec - val2->tv_sec;
- - if(usecdiff < 0) {
- - usecdiff = 1000000 + usecdiff;
- - secdiff--;
- - }
- - retval->tv_sec = secdiff;
- - retval->tv_usec = usecdiff;
- - if(secdiff < 0)
- - return -1;
- - if(secdiff > 0)
- - return 1;
- - return (usecdiff < 0 ) ? -1 : ((usecdiff > 0 ) ? 1 : 0);
- + int usecdiff = val1->tv_usec - val2->tv_usec;
- + int secdiff = val1->tv_sec - val2->tv_sec;
- + if(usecdiff < 0) {
- + usecdiff = 1000000 + usecdiff;
- + secdiff--;
- + }
- + retval->tv_sec = secdiff;
- + retval->tv_usec = usecdiff;
- + if(secdiff < 0)
- + return -1;
- + if(secdiff > 0)
- + return 1;
- + return (usecdiff < 0 ) ? -1 : ((usecdiff > 0 ) ? 1 : 0);
- }
-
- /****************************************************************************
- @@ -3093,7 +3097,11 @@
- struct ifreq *ifr=NULL;
- int i;
-
- -#ifdef USE_IFREQ
- +#if defined(EVEREST)
- + int n_interfaces;
- + struct ifconf ifc;
- + struct ifreq *ifreqs;
- +#elif defined(USE_IFREQ)
- struct ifreq ifreq;
- struct strioctl strioctl;
- struct ifconf *ifc;
- @@ -3118,7 +3126,34 @@
- }
-
- /* Get a list of the configured interfaces */
- -#ifdef USE_IFREQ
- +#ifdef EVEREST
- + /* This is part of SCO Openserver 5: The ioctls are no longer part
- + if the lower level STREAMS interface glue. They are now real
- + ioctl calls */
- +
- + if (ioctl(sock, SIOCGIFANUM, &n_interfaces) < 0) {
- + DEBUG(0,( "SIOCGIFANUM: %s\n", strerror(errno)));
- + } else {
- + DEBUG(0,( "number of interfaces returned is: %d\n", n_interfaces));
- +
- + ifc.ifc_len = sizeof(struct ifreq) * n_interfaces;
- + ifc.ifc_buf = (caddr_t) alloca(ifc.ifc_len);
- +
- + if (ioctl(sock, SIOCGIFCONF, &ifc) < 0)
- + DEBUG(0, ( "SIOCGIFCONF: %s\n", strerror(errno)));
- + else {
- + ifr = ifc.ifc_req;
- +
- + for (i = 0; i < n_interfaces; ++i) {
- + if (if_ipaddr->s_addr ==
- + ((struct sockaddr_in *) &ifr[i].ifr_addr)->sin_addr.s_addr) {
- + found = True;
- + break;
- + }
- + }
- + }
- + }
- +#elif defined(USE_IFREQ)
- ifc = (struct ifconf *)buff;
- ifc->ifc_len = BUFSIZ - sizeof(struct ifconf);
- strioctl.ic_cmd = SIOCGIFCONF;
- @@ -3482,8 +3517,8 @@
- ****************************************************************************/
- void Abort(void )
- {
- - DEBUG(0,("Abort called. Probably got SIGPIPE\n"));
- - exit(1);
- + DEBUG(0,("Probably got SIGPIPE\nExiting\n"));
- + exit(2);
- }
-
-
- @@ -3664,7 +3699,8 @@
- {
- if (port) {
- if (port == 139 || port == 137)
- - DEBUG(dlevel,("bind failed on port %d\n",port));
- + DEBUG(dlevel,("bind failed on port %d (%s)\n",
- + port,strerror(errno)));
- close(res);
-
- if (dlevel > 0 && port < 1000)
- diff -u -r --new-file last-version/source/version.h samba-1.9.15p7/source/version.h
- --- last-version/source/version.h Tue Dec 5 16:00:09 1995
- +++ samba-1.9.15p7/source/version.h Mon Jan 15 21:30:44 1996
- @@ -1 +1 @@
- -#define VERSION "1.9.15p6"
- +#define VERSION "1.9.15p7"
- diff -u -r --new-file last-version/source/vt_mode.c samba-1.9.15p7/source/vt_mode.c
- --- last-version/source/vt_mode.c Wed Nov 22 15:01:00 1995
- +++ samba-1.9.15p7/source/vt_mode.c Mon Jan 15 17:42:46 1996
- @@ -33,6 +33,7 @@
- extern char *strdup();
- #endif
-
- +extern int Client;
-
- #ifdef LINUX
- # define HAS_VTY
-